import { VNodeDirective } from '@/interface/types/vnode';

const mounted = (el: HTMLElement, binding: VNodeDirective) => {
  const { value } = binding;
  if (typeof value === 'undefined' || value) {
    el.focus();
  }
}

export const Autofocus = {
  mounted
}
